import { createSlice } from '@reduxjs/toolkit'
import dayjs from 'dayjs'


export const counterSlice = createSlice({
    name: 'counter',
    initialState: {
        strta: "杭州",
        ent: '厦门',
        dayjs: dayjs().format('YYYY-MM-DD'),
    },
    reducers: {
        upzhizhu(state) {
            const timer = state.strta
            state.strta = state.ent
            state.ent=timer
       }
    },
})


export const { upzhizhu } = counterSlice.actions

export default counterSlice.reducer